<@admin.html >
<div class="title">
	<h1><#if info?exists&&info.id?exists>编辑<#else>添加</#if>公告</h1>
	<span class="tTip">标注"<em>*</em>"为必填项</span>
</div>
<div class="box">
	<div class="inner">
		<div class="tx_table">
			<h2><#if (info?exists)&&(info.id?exists)>编辑<#else>添加</#if>公告</h2>
			<form name="saveForm" id="saveForm" action="${base}/admin/info/index!save" method="post">
				<input type="hidden" name="info.id" value="${(info.id?c)!}"/>
				<input type="hidden" name="info.status" value="${(info.status)!}"/>
				<input type="hidden" name="info.pubDate" value="${(info.pubDate?string("yyyy-MM-dd"))!}"/>
				<input type="hidden" name="info.createDate" value="${(info.createDate?string("yyyy-MM-dd"))!}"/>
			<div class="data">
				<table>
					<colgroup width="24%"></colgroup>
					<tbody>
						<tr>
							<th><em>*</em>公告内容：</th>
							<td>
								<input class="Q" type="text" name="info.title" id="info_title" size="50" value="${(info.title)!}"/>
								<span id="info_titleTip"></span>
							</td>
						</tr>
						<tr>
							<th>封面上传：</th>
							<td class="tx_sender" style="text-align:left;">
								<input id="upload_1" class="F" name="upload" type="file" value="" onchange="return ajaxFileUpload(this);"/>
								<img id="loading" src="" style="display:none;">
								<input id="hidden_1" type="hidden" name="info.cover" value="${(info.cover)!}"/>	
							</td>
						</tr>
						<tr>
							<th>图片预览：</th>
							<td>
								<ul class="pic_preview">
									<li>
										<span class="pic">
											<div id="imgshow_pic">
												<#if info??&&info.cover?has_content>
													<img id="imgshow_1" width="474px" height="198px" src="${(info.cover)!}"class="multiple_img" onClick="openCut(this,'hidden_1');"/>
												<#else>
													<img id="imgshow_1" width="474px" height="198px" src="${statics}/plugins/fileupload/pic_upload_default.jpg"  class="multiple_img" onClick="openCut(this,'hidden_1');"/>
												</#if>
											</div>
											
										</span>

									</li>
								</ul>
							</td>
						</tr>

						<tr>
							<th>详细内容：</th>
							<td><div id="news_content"><textarea name="info.context">${(info.context)!}</textarea></div></td>
						</tr>
					</tbody>
				</table>
				<div class="tx_sender">
						<input class="step" type="submit" value="保 存" title="保 存"/>
						<input class="step" type="button" value="返回列表" title="返回列表" onclick="javascript:location.href='${base}/admin/info/'"/>
				</div>
			</div>
			</form>
		</div>
	</div>
</div>
<#include "/WEB-INF/content/tag/cut.ftl">
<script type="text/javascript">
	$(document).ready(function(){
		$.formValidator.initConfig({formid:"saveForm",onerror:function(msg){},onsuccess:function(){return true;}});					
		$("#info_title")
		.formValidator({onshow:"请输入公告内容",onfocus:"请输入公告内容",oncorrect:"公告内容正确"})
		.inputValidator({min:6,max:100,onerror:"公告中文名称为6-100位字符,1个汉字算2位字符,请确认"});
	});
	
</script>
<script type="text/javascript">
	window.onload = function() {	
		var oFCKeditor = new FCKeditor( 'info.context' ) ;
		oFCKeditor.BasePath = "${statics}/plugins/editor/fckeditor/"
		oFCKeditor.ReplaceTextarea() ;
	}
</script>
</@admin.html >